package com.api.syh56.shengyunhui.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import lombok.*;
import lombok.experimental.FieldDefaults;

import java.time.LocalDateTime;

/**
 * 优惠券使用记录
 */
@Data
@FieldDefaults(level = AccessLevel.PRIVATE)
@TableName("user_coupon")
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class UseCoupon {
    @Column(name = "id")
    Long id;

    @Column(name = "uid")
    Long uid;

    @Column(name = "coupon_id")
    Long couponId;

    @Column(name = "waybill_id")
    Long waybillId;

    @Column(name = "creation_time")
    @TableField(fill = FieldFill.INSERT)
    LocalDateTime creationTime;

    @Column(name = "last_modification_time")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    LocalDateTime lastModificationTime;
}
